home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PsL Monthly 1993 December
/
PSL Monthly Shareware CD-ROM (December 1993).iso
/
prgmming
/
dos
/
c
/
mflzt.exe
/
lha
/
MFL_QREF.DOC
< prev
next >
Wrap
Text File
|
1989-11-26
|
27KB
|
982 lines
MICROFIRM FUNCTION LIBRARY QUICK REFERENCE GUIDE
Copyright 1988-89 by Robert B. Stout dba MicroFirm
*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*
* MFLFILES.H *
*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*
**********************************************************
* Recursive find first/next functions *
**********************************************************
struct FIND * rfind_1st(char *, int, struct FIND *);
Recursive find first matching file
struct FIND * rfind_nxt(struct FIND *, LOGICAL);
Recursive find next matching file
#define _dos_findfirst(path,attrib,ffblk)
Find first matching file
#define _dos_findnext(ffblk)
Find next matching file
**********************************************************
* Check for the existance of a file *
**********************************************************
int exists(char *);
See if a file exists
int access(char *, int);
Check if a file exists
**********************************************************
* Change/verify disk drives or directories *
**********************************************************
int chdrv(char);
Change disk drives
LOGICAL drvalid(char);
See if a drive is valid
char getdrv(void);
Return default drive
int pushdir(char *);
Save current directory, then go to a new one
int popdir(void);
Return to previous directory
**********************************************************
* File operations using FCB functions *
**********************************************************
int FCB_creat(char *, int);
Create a file using a file control block
int FCB_kill(char *, int);
Delete a file using a file control block
struct XFCB * FCB_open(char *, int);
Open a file using a file control block
int FCB_close(struct XFCB *);
Close a file using a file control block
int FCB_reads(struct XFCB *, void *);
Sequential read using a file control block
int FCB_writes(struct XFCB *, void *);
Sequential write using a file control block
int FCB_readr(struct XFCB *, void *, long);
Random read using a file control block
int FCB_writer(struct XFCB *, void *, long);
Random write using a file control block
**********************************************************
* Manipulate volume labels *
**********************************************************
char *flretvol(char);
Return volume label for a specified drive
int flremvol(char);
Remove volume label for a specified drive
int flsetvol(char, char *);
Set volume label for a specified drive
**********************************************************
* Delete files using FCB's - very fast with wildcards! *
**********************************************************
int del_files(char *, char *);
Delete all files matching a spec in a given directory
**********************************************************
* Get/set file attributes *
**********************************************************
int flsetatr(char *, int);
Set a file's attributes
int flgetatr(char *);
Get a file's attributes
#define chmod(f,a)
Set a file's attributes
**********************************************************
* Set file translation mode *
**********************************************************
int setmode(int, int);
Set mode of a file w/ file handle
int setfmode(FILE *, int);
Set mode of a file w/ file descriptor
**********************************************************
* Directory operations using file-type functions *
**********************************************************
DOS_DIR * opendir(char *);
Open a directory for reading
void closedir(DOS_DIR *);
Close a directory
struct FIND * readdir(DOS_DIR *);
Read directory entries
int dirmask(struct FIND *, char *, char *, unsigned, unsigned);
Validates directory entries based on name and attributes
**********************************************************
* ANSI functions *
**********************************************************
int dup(int);
Duplicate a file handle
int dup2(int, int);
Force two file handles to the same file
**********************************************************
* Stream functions for installable stream filters. *
**********************************************************
SFILE * sfopen(char *, char *);
Open a file as a filterable stream
SFILE * scopen(int (*)(), int (*)(), char *);
Open a channel as a filterable stream
int sclose(SFILE *);
Close an open stream
int sfputc(int, SFILE *);
Put a character to a stream
int sfputs(char *, SFILE *);
Put a string to a stream
size_t sfwrite(void *, size_t, size_t, SFILE *);
Write a buffer to a stream
int sfgetc(SFILE *);
Get a character from a stream
char * sfgets(void *, int, SFILE *);
Get a string from a stream
size_t sfread(void *, size_t, size_t, SFILE *);
Read a buffer from a stream
LOGICAL sfinstall(SFILE *, SFILTER *);
Install a stream filter
**********************************************************
* Simple stream filters *
**********************************************************
extern SFILTER ucase_filt,
Forces a stream to upper case
extern SFILTER lcase_filt;
Forces a stream to lower case
**********************************************************
* Stream encryption function *
**********************************************************
int crypt_install(SFILE *, char *, int);
Installs an encryption/decryption filter
**********************************************************
* Stream compression/expansion functions *
**********************************************************
int ncode_install(SFILE *);
Installs an RLE encoder as a stream filter
int dcode_install(SFILE *);
Installs an RLE decoder as a stream filter
**********************************************************
* File truncation functions *
**********************************************************
int trunc(int, long);
Truncate an open'ed file
int ftrunc(FILE *, long);
Truncate an fopen'ed file
int truncate(char *, long);
Truncate a named file
**********************************************************
* Filename parsing functions *
**********************************************************
int fnsplit(char *,char *,char *,char *,char *,char *,char *);
Split a string into drive/path/file/ext
char * fnmerge(char *,char *,char *,char *,char *,char *,char *);
Merge drive/path/file/ext into a file string
int has_wild(char *);
Checks a string for DOS wildcards
void basename(char *, char *, char *);
Split a string into path and/or filename
int wildname(char *, char *, int);
Matches filenames against a pattern
**********************************************************
* Normalize file names *
**********************************************************
int flnorm(char *, char *);
Normalize a filename
char * fln_fix(char *);
Remove "dot" directories from pathnames
char * unix2dos(char *);
Converts Unix-style paths to DOS-style
**********************************************************
* Open files using a path specification *
**********************************************************
FILE * fopenp(char *, char *);
fopen a file in the PATH
FILE * fopeng(char *, char *, char *);
fopend/fopenp combination
FILE * fopend(char *, char *, char *);
Fopen a file in an environment variable
int openp(char *, int);
Open a file in the PATH
int opend(char *, int, char *);
Open a file in the PATH
int openg(char *, int, char *);
opend/openp combination
int getpath(char *);
Retrieve the PATH variable a